<%@ page language="PL/SQL" %>
<%@ page contentType="text/html" %>
<%@ plsql procedure="StudentList" %>
<%-- This example displays the last name and first name of every 
     student in the University.Student table. --%>
<%!
  CURSOR stu_cursor IS
  SELECT lastName, firstName
  FROM University.Student
  ORDER BY lastName;
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>Student List</title>
</head>
<body TEXT="#000000" BGCOLOR="#FFFFFF">
<h1>Student List</h1>
<table width="40%" border="1">
<tr>
<th align="left">Last Name</th>
<th align="left">First Name</th>
</tr>
<%  FOR stu IN stu_cursor LOOP %>
  <tr>
  <td> <%= stu.lastName %> </td>
  <td> <%= stu.firstName %> </td>
  </tr>
<%  END LOOP; %>
</table>
</body>
</html>





--Figure 13.12 A PSP Script to Display Student Names
 

 

